//
//  XQTimeTool.swift
//  Spark Peso
//
//  Created by 小琦 on 2025/2/4.
//

import UIKit

class XQTimeTool {

    class func nowTime() -> Int64 {
        let timeStampInSeconds = Date().timeIntervalSince1970
        let formattedTimeStamp = String(format: "%.0f", timeStampInSeconds)
        return Int64(formattedTimeStamp) ?? 0
    }
    
    class func currentZone() -> String {
        
        let currZone = TimeZone.current
            
        let secondsFromGMT = currZone.secondsFromGMT()
        
        let h = secondsFromGMT / 3600
        
        let gm = String(format: "GMT%+d", h)
        
        return gm
        
    }
    
}
